home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-15 | 91.5 KB | 3,157 lines |
- Newsgroups: comp.sources.unix
- From: Christophe.Wolfhugel@univ-lyon1.fr (Chris Wolfhugel)
- Subject: v26i160: tulp-3.0.3 - a listserv-like mailing list manager, V3.0.3, Part01/02
- Sender: unix-sources-moderator@vix.com
- Approved: paul@vix.com
-
- Submitted-By: Christophe.Wolfhugel@univ-lyon1.fr (Chris Wolfhugel)
- Posting-Number: Volume 26, Issue 160
- Archive-Name: tulp-3.0.3/part01
-
- TULP is a mailing-lists manager. It implements a subset of the commands of
- the well known LISTSERV, used mainly in the Bitnet world. It can also be
- used, in a very limited manner, as a mail-server for text archives.
-
- TULP allows an easy management of mailing-lists. Once their are created by
- the TULP-manager, users can subscribe, signoff, get the list of
- subscribers, or retrieve past articles by sending mail to an automatic
- sofware, typically listserv@node.dom.ain. The implemented commands are
- really close to the syntax used on Bitnet-Listserv running on IBM
- mainframes. Note that there is *no* connection between the original
- listserv running on IBM mainframes and TULP.
-
- Each list can have several attributes:
-
- + Multiple list status: public, private, moderated.
-
- + List of owners an an editor.
-
- + Mutliple "review" status: public, private, owners.
-
- + Multiple subscription schemes: public, owners, closed.
-
- + Messages numbering (optional).
-
- + Messages archival (on a monthly basis, optional).
-
- TULP is interfaced with the Sendmail MTA in the released version but it
- should also be easily adaptable to other mail transport agents.
-
- TULP has successfully been tested and is currently already in production
- under following systems:
-
- AIX 3.1 & 3.2
- A/UX 3
- HP-UX 8.0
- SunOS 4.1
- SVR4 3.0
-
- TULP is distributed under the GNU General Public License.
-
- Kimmo.Suominen@lut.fi (Kimmo Suominen)
- Christophe.Wolfhugel@univ-lyon1.fr (Chris Wolfhugel)
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 2)."
- # Contents: ANNOUNCE AUTHORS COPYRIGHT INSTALL MANIFEST Makefile
- # PATCHES README VERSIONS WHERE WORKING ad.c ad.h conf.h deliver
- # ext.h fakesyslog.c fakesyslog.h helpfile internal.h k.c l.h lc.h
- # lists lp.c lp.h messages.h popen.c popen.h rc.tulp str.c str.h
- # test.u test.w tulp.5 tulp.8 vers.c
- # Wrapped by vixie@gw.home.vix.com on Thu Apr 15 18:34:02 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'ANNOUNCE' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ANNOUNCE'\"
- else
- echo shar: Extracting \"'ANNOUNCE'\" \(4145 characters\)
- sed "s/^X//" >'ANNOUNCE' <<'END_OF_FILE'
- X[ comp.sources.unix note -- this is really 3.0.3, but this announcement text
- X has not been updated by the author. --vix ]
- X
- Newsgroups: comp.mail.misc
- Subject: Announcement: TULP 3.0.1 (mailing list manager) for Unix
- Summary: TULP is a listserv-like application running on Unix stations
- X
- X The Unix Listserv Program - TULP
- X
- X Version 3.0.1 - November 1992
- X
- X
- TULP is a mailing-lists manager. It implements a subset of the commands of
- the well known LISTSERV, used mainly in the Bitnet world. It can also be
- used, in a very limited manner, as a mail-server for text archives.
- X
- This version brings many improvements to the 2.00 released last June (see
- below).
- X
- TULP allows an easy management of mailing-lists. Once their are created by
- the TULP-manager, users can subscribe, signoff, get the list of
- subscribers, or retrieve past articles by sending mail to an automatic
- sofware, typically listserv@node.dom.ain. The implemented commands are
- really close to the syntax used on Bitnet-Listserv running on IBM
- mainframes. Note that there is *no* connection between the original
- listserv running on IBM mainframes and TULP.
- X
- XEach list can have several attributes:
- X
- X+ Multiple list status: public, private, moderated.
- X
- X+ List of owners an an editor.
- X
- X+ Mutliple "review" status: public, private, owners.
- X
- X+ Multiple subscription schemes: public, owners, closed.
- X
- X+ Messages numbering (optional).
- X
- X+ Messages archival (on a monthly basis, optional).
- X
- TULP is interfaced with the Sendmail MTA in the released version but it
- should also be easily adaptable to other mail transport agents.
- X
- TULP has successfully been tested and is currently already in production
- under following systems:
- X
- X AIX 3.1 & 3.2
- X A/UX 3
- X HP-UX 8.0
- X SunOS 4.1
- X SVR4 3.0
- X
- TULP is distributed under the GNU General Public License.
- X
- The package is available by anonymous ftp at several places. If you
- decide to put the package and its updates available by anonymous ftp,
- please drop me a note so that I can add your site name to the documentation.
- X
- X--- Author's sites -------------------------------------------------
- X
- Anonymous ftp to grasp1.univ-lyon1.fr [134.214.100.25]
- X /pub/unix/mail/listserv/tulp-3.0.1.tar.Z
- X
- Anonymous ftp to lut.fi [157.24.10.8]
- X /pub/tulp/tulp-3.0.1.tar.Z
- X
- X--- Other shadowing sites ------------------------------------------
- X
- Anonymous ftp to nic.funet.fi [128.214.6.100]
- X /pub/unix/mail/servers/tulp-3.0.1.tar.Z
- X
- Anonymous ftp to ftphost.comp.vuw.ac.nz [130.195.5.12]
- X /pub/mail/tulp-3.0.1.tar.Z
- X
- Anonymous ftp to ftp.vifp.monash.edu.au [130.194.124.128]
- X /pub/src/mail/tulp-3.0.1.tar.Z
- X
- Anonymous ftp to ftp.zrz.tu-berlin.de [130.149.4.50]
- X /pub/mail/server/tulp/tulp-3.0.1.tar.Z
- X
- If you don't have anonymous ftp access you can retrieve the package through
- e-mail by sending the following command to <listserv@grasp1.univ-lyon1.fr>:
- X
- GET TULP tulp-3.0.1.uue
- X
- An uuencoded file will be sent to you. Note that the command must be in
- the body of your message, not in the subject.
- X
- If you wish to be informed of releases of new versions or patches you may
- subscribe to the "tulp-dist" mailing list. To do so, send a mail
- to <listserv@grasp1.univ-lyon1.fr> with a command like:
- X
- sub tulp-dist Firstname Lastname
- X
- The command must not be in the subject of the mail but in the body of the
- message. This list will only be informed of new released, discussion about
- about TULP goes to the list described below.
- X
- A discussion list for TULP and listservs for Unix in general also exists.
- The list name is <listnix@grasp1.univ-lyon1.fr>. If you wish to join,
- commands must be sent to listserv@grasp1.univ-lyon1.fr:
- X
- XExample:
- SUB listnix Chris Wolfhugel
- X
- Any questions/comments are welcome by mail or to the list.
- X
- Modifications since release 2.00: mainly a design change in how the mail
- is delivered and handled as well as some bugfixes and cleanup work.
- X
- Kimmo Suominen <Kimmo.Suominen@lut.fi>
- Chris Wolfhugel <Christophe.Wolfhugel@univ-lyon1.fr>
- END_OF_FILE
- if test 4145 -ne `wc -c <'ANNOUNCE'`; then
- echo shar: \"'ANNOUNCE'\" unpacked with wrong size!
- fi
- # end of 'ANNOUNCE'
- fi
- if test -f 'AUTHORS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'AUTHORS'\"
- else
- echo shar: Extracting \"'AUTHORS'\" \(603 characters\)
- sed "s/^X//" >'AUTHORS' <<'END_OF_FILE'
- X$Id: AUTHORS,v 1.3 92/09/28 21:06:56 wolf Exp $
- X
- The following persons have contributed to the developement of the
- Listserv software:
- X
- Kimmo Suominen <Kimmo.Suominen@lut.fi>
- X POSIX features, startup & deliver scripts.
- X gethostname, uname stuff.
- X General portability enhencements.
- X Malloc stuff rewritten & corrected
- X
- Christophe Wolfhugel <Christophe.Wolfhugel@univ-lyon1.fr> (as himself)
- X Initial application.
- X Enchancements 2.0 -> 3.0.
- X
- Christophe Wolfhugel <Christophe.Wolfhugel@hsc-sec.fr> (for his boss)
- X Moderators, list flags, etc...
- X Windowed pipe handling,
- X Lots of enhencements.
- END_OF_FILE
- if test 603 -ne `wc -c <'AUTHORS'`; then
- echo shar: \"'AUTHORS'\" unpacked with wrong size!
- fi
- # end of 'AUTHORS'
- fi
- if test -f 'COPYRIGHT' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'COPYRIGHT'\"
- else
- echo shar: Extracting \"'COPYRIGHT'\" \(1099 characters\)
- sed "s/^X//" >'COPYRIGHT' <<'END_OF_FILE'
- X$Id: COPYRIGHT,v 1.3 92/06/12 06:52:53 listserv Exp $
- X
- XFollowing Copyright applies, except for the special cases indicated
- above.
- X
- Copyright (C) 1991, Christophe Wolfhugel as himself
- X Email: Christophe.Wolfhugel@univ-lyon1.fr
- X
- Copyright (C) 1992, Kimmo Suominen as himself
- X Email: Kimmo.Suominen@lut.fi
- X
- Copyright (C) 1992, Christophe Wolfhugel & Herve Schauer Consultants
- X Email: Christophe.Wolfhugel@hsc-sec.fr
- X Christophe.Wolfhugel@univ-lyon1.fr
- X
- X
- Please see the document LICENCE for the conditions of use.
- X
- X
- X--- Special cases ------------------------------------------------------------
- X
- XExcept for fakesyslog, where the copyright belongs to their original
- authors (Stan Barber is one of those, but unfortunately I forgot the
- name of the second one).
- X
- fakesyslog has been taken from the NNTP package (with authorization).
- X
- XExcept for popen.c, where the copyright belongs to their original
- authors (The regents of the University of California).
- The module popen.c has been slightly modified to fit listserv's needs.
- END_OF_FILE
- if test 1099 -ne `wc -c <'COPYRIGHT'`; then
- echo shar: \"'COPYRIGHT'\" unpacked with wrong size!
- fi
- # end of 'COPYRIGHT'
- fi
- if test -f 'INSTALL' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'INSTALL'\"
- else
- echo shar: Extracting \"'INSTALL'\" \(7126 characters\)
- sed "s/^X//" >'INSTALL' <<'END_OF_FILE'
- X The Unix Listserv Program
- X Version 3.0.0
- X Installation and Operations Guide
- X
- X Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X
- X1) Installation / Customization
- X
- X- Create a user named "listserv" on your system, preferably in its own
- X group (this makes it easier to give access to maintenance users).
- X You may of course choose another user if you wish.
- X
- X The user should *not* have any special privileges. It is *not* an
- X administrative user.
- X
- X You may wish to disable logins on that account, and allow access
- X only with rlogin (to avoid having a shared password).
- X
- X It is also a nice idea to put listserv's home directory on a stable
- X file system, ie. where there are few risks of running out of space.
- X In the current release, TULP gives an undefined (which could be
- X mail loops, but we did not test this) behavior if the file system it's
- X running on is full. Do not put the directory on a file system
- X which is vital for the system.
- X
- X Create the directory expl in listserv's home directory. If you
- X prefer using another organization, you'll have to change the
- X adequate defines in conf.h and Makefile.
- X
- X TULP's binaries and scripts will be put in /usr/local/etc, all
- X service files will be in ~/expl and we suggest that you put
- X the sources in ~/src.
- X
- X- Login as root and create some mail aliases (described method
- X is for Sendmail). Aliases are generally stored in /usr/lib/aliases
- X or /etc/aliases, some sites may have another location, anyway the
- X system administrator should know about it.
- X
- X You must create 3 service aliases:
- X listman: address of the listserv manager (you!)
- X listserv-request: listman
- X list-errors: where errors should be reported (generally also you).
- X These two aliases must of course *not* point to Listserv otherwise you'll
- X create a deadly loop.
- X
- X If you have decided not to use the -request facility in conf.h then
- X you do not need the listserv-request alias. It is strongly
- X discouraged not to use the -request facility.
- X
- X Ask your system administrator to add "listserv" to the list of
- X trusted users, with Sendmail this will allow listserv to send mail
- X while defining the appropriate From envelope. With other MTAs,
- X please consult their manuals in order to arrive to the same result.
- X
- X If you wish to use the test list, also add an alias:
- X test: "|/usr/local/etc/deliver test"
- X
- X And finally alias listserv to the deliver package:
- X listserv: "|/usr/local/etc/deliver listserv"
- X
- X- Issue a newaliases in order to refresh the database. Also rebuild
- X your frozen Sendmail configuration file if any. The Sendmail
- X daemon should be restarted in order to be sure that all modifications
- X have been taken into account.
- X
- X- You'll now have to edit the configuration file conf.h in order to
- X set the parameters according to your system and to your wishes.
- X
- X Parse this file carefully in order not to miss anything. If in
- X future runs you see CPU loops on the Listserv process then maybe
- X there is a problem with the signal handling on your system.
- X In this case you may wish to define NO_SIGUSR1 in conf.h, you'll
- X also need to modify the 'deliver' script in order to have it
- X not calling 'kilst' anymore'.
- X
- X- Edit helpfile in order to fill it in with your local adresses.
- X You can also add whatever you'd like to. For example, on my
- X production version on grasp1.univ-lyon1.fr I have explanations
- X on how to retrieve the FAQ archives via the listserv.
- X
- X- Check and modify Makefile according to your system. On AIX 3.1,
- X -D_BSD does not need to be added (if you have compilation errors,
- X then it's that you have wrong options).
- X
- X Don't forget to put the proper directories.
- X
- X- Edit and customize 'deliver' and 'rc.tulp' according to your
- X system.
- X
- X- Issue 'make all' in order to compile all the stuff.
- X
- X- Once compiled and linked successfully, issue a make 'install'.
- X That will copy the executables and scripts to the right place.
- X
- X Verify that 'kilst' is setuid to listserv (no danger, check the source
- X to get the confirmation).
- X
- X
- X- Copy helpfile, lists and test.* to ~/expl. If you wish to
- X create new lists, refer to the latter comments and also to tulp(5).
- X
- The installation of TULP in now ready, you can now create your lists
- and start the application.
- X
- X
- X2) Running TULP
- X
- TULP should be started preferably with the /usr/local/etc/rc.tulp
- script.
- X
- The daemon should immediately go into background (except if DEBUG was
- defined in the Makefile). You should now have the 'test' list ready
- for use with one subscriber: the list-manager (listman).
- X
- Important eventss are filed to the syslog or to the fakesyslog you have
- defined.
- X
- The world-readable file /usr/local/etc/tulp.pid exists as long as the
- listserv is active. It's there to indicate the current pid to the
- kilst program.
- X
- You may wish to create a file listname.n in order to enable the
- usage of the X-Sequence: field in the header of the resent messages.
- X
- X
- X3) Listserv shutdown
- X
- Normal shutdown is obtained when sending kill -15 to the listserv pid.
- shutdown generally does not take more than a few seconds, but when
- relaying a message it can be much longer.
- X
- X
- X4) Creating a list (delete is reverse operation)
- X
- Creating a list is easy.
- X
- X- Choose the list name in order to be at most MAX_FILE-2 long (this name
- X if called 'listname' for the following text).
- X
- X In fact it should not be longer than 12 characters as, too bad,
- X Posix only requires 14 characters long filenames. If the names
- X are longer, you'll be system specific.
- X
- X- Go to ~/expl and create 'listname.w' containing the welcome
- X message that will be sent to every new subscriber.
- X Create 'listname.u' and put in it any user you wish to subscribe
- X immediately (see test.u format), otherwise just 'touch listname.u'.
- X The file *must* exist. Create the file listname.n if you wish
- X to have Sequence numbers.
- X If you wish to have archiving, issue 'mkdir listname'.
- X Verify that these files are mode 700.
- X
- X Customize the header of list.u (see file tulp(5)) according to your
- X needs.
- X
- X- The file list.n, if existing contains the number (in text) of the next
- X message. If present, the X-Sequence: field will be added to every
- X forwarded message.
- X
- X- Edit the file lists and add the new list if you wish to have that list
- X appear in the catalog.
- X
- X- Edit (as root) /usr/lib/aliases and alias the new list name to the
- X deliver script and refresh the aliases database.
- X Also put the -request alias (to a human) if you have choosen
- X the adequate compilation option in conf.h.
- X Exemple:
- X tulp: "|/usr/local/etc/deliver tulp"
- X tulp-request: listman
- X
- The new list is ready, you don't need to restart the listserv.
- X
- Don't forget to subscribe to the new list, specifying address 'listname@host'
- as subscriber email.
- X
- X
- X5) Miscellaneous
- X
- This listserv is used successfully in coordination with C-News in order
- to establish a full bi-directionnal gateway between mailing lists and
- Usenet newsgroups. This works fine only if listserv if the 'head' of
- the gatewayed list/group.
- END_OF_FILE
- if test 7126 -ne `wc -c <'INSTALL'`; then
- echo shar: \"'INSTALL'\" unpacked with wrong size!
- fi
- # end of 'INSTALL'
- fi
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(1354 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X ANNOUNCE 1
- X AUTHORS 1
- X COPYRIGHT 1
- X INSTALL 1
- X LICENCE 2
- X MANIFEST 1 This shipping list
- X Makefile 1
- X PATCHES 1
- X README 1
- X VERSIONS 1
- X WHERE 1
- X WORKING 1
- X ad.c 1
- X ad.h 1
- X conf.h 1
- X deliver 1
- X ext.h 1
- X fakesyslog.c 1
- X fakesyslog.h 1
- X helpfile 1
- X internal.h 1
- X k.c 1
- X l.c 2
- X l.h 1
- X lc.c 2
- X lc.h 1
- X lists 1
- X lp.c 1
- X lp.h 1
- X messages.h 1
- X popen.c 1
- X popen.h 1
- X rc.tulp 1
- X str.c 1
- X str.h 1
- X test.u 1
- X test.w 1
- X tulp.5 1
- X tulp.8 1
- X vers.c 1
- END_OF_FILE
- if test 1354 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(3473 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X# $Id: Makefile,v 1.12 92/12/04 07:40:48 wolf Exp $
- X#-------------------------------------------------------------------------
- X# Listserv - Unix Mailing List manager (sub-set of FRECP's
- X# Bitnet Listserv tool).
- X#
- X# Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X#
- X# Please read the files COPYRIGHT and AUTHORS for the extended
- X# copyrights refering to this file.
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 1, or (at your option)
- X# any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X#----------------------------------------------------------------------
- X#
- X# Generic flags
- CC = cc
- X#CC = gcc #-Wall # I do not have gcc so attend lots of warnings
- CFLAGS = -O
- LDFLAGS = -O
- X# If your linker needs some...
- X#LIBS =
- X#
- X# AIX does not require any special LIB. Use the standard cc also.
- X#
- X# Apple A/UX 3 (junk Unix) needs Posix options and you'll have to replace
- X# a u_int by unsigned int in popen.c, I forgot that on the patch. Another
- X# good solution would be to get a real Unix system.
- X#CFLAGS = -ZP
- X#
- X# On HP-UX
- X#CFLAGS = -Aa -D_HPUX_SOURCE -O
- X#
- X# SVR4 requires following libraries
- LIBS = -lsocket -lnsl
- X
- X# Directory where the binaries and other stuff will reside
- INSTDIR = /usr/local/etc/tulp
- MAN5 = /usr/share/man/man5
- MAN8 = /usr/share/man/man8
- X
- X# User and group to whome INSTDIR should belong, USER must be the
- X# user under which TULP will be running.
- USER = listserv
- GROUP = listserv
- X
- X# Path to your system's Berkeley install program
- INSTALL = /usr/ucb/install
- X
- X#---- Stop you should not need to modify anything below ---
- X
- XEXE = listserv kilst
- UTILS = Makefile
- X#
- SRC = l.c lc.c lp.c str.c ad.c vers.c k.c fakesyslog.c popen.c
- OBJ1 = l.o lc.o lp.o str.o ad.o vers.o fakesyslog.o popen.o
- OBJ2 = k.o
- INC = conf.h ext.h ad.h fakesyslog.h l.h lc.h lp.h popen.h str.h
- X
- X# Standard targets
- X
- all: listserv kilst
- X
- listserv: $(OBJ1)
- X $(CC) $(LDFLAGS) -o listserv $(OBJ1) $(LIBS)
- X
- kilst: $(OBJ2)
- X $(CC) -o kilst $(OBJ2)
- X
- lint:
- X lint $(SRC)
- X
- install: listserv kilst deliver rc.tulp tulp.5 tulp.8
- X -mkdir $(INSTDIR); chmod 755 $(INSTDIR)
- X chown $(USER) $(INSTDIR); chgrp $(GROUP) $(INSTDIR)
- X $(INSTALL) -g $(GROUP) -o $(USER) -m 711 listserv $(INSTDIR)
- X $(INSTALL) -g $(GROUP) -o $(USER) -m 4711 kilst $(INSTDIR)
- X $(INSTALL) -g $(GROUP) -o $(USER) -m 755 deliver $(INSTDIR)
- X $(INSTALL) -g $(GROUP) -o $(USER) -m 755 rc.tulp $(INSTDIR)
- X $(INSTALL) -g bin -o bin -m 444 tulp.5 $(MAN5)
- X $(INSTALL) -g bin -o bin -m 444 tulp.8 $(MAN8)
- X
- clean:
- X rm -f $(EXE) $(OBJ1) $(OBJ2)
- X
- X# Dependencies
- X
- ad.o: conf.h ext.h internal.h
- fakesyslog.o: conf.h fakesyslog.h internal.h
- k.o: conf.h internal.h
- l.o: conf.h ext.h lp.h str.h popen.h ad.h lc.h fakesyslog.h internal.h
- lc.o: conf.h ext.h l.h lp.h messages.h str.h popen.h fakesyslog.h internal.h
- lp.o: conf.h ext.h str.h fakesyslog.h internal.h
- popen.o: conf.h fakesyslog.h internal.h
- str.o: conf.h internal.h
- vers.o: conf.h internal.h
- END_OF_FILE
- if test 3473 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'PATCHES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'PATCHES'\"
- else
- echo shar: Extracting \"'PATCHES'\" \(90 characters\)
- sed "s/^X//" >'PATCHES' <<'END_OF_FILE'
- X17-Nov-1992 3.0.0 to 3.0.1
- X04-Dec-1992 3.0.1 to 3.0.2
- X15-Mar-1993 3.0.2 to 3.0.3
- END_OF_FILE
- if test 90 -ne `wc -c <'PATCHES'`; then
- echo shar: \"'PATCHES'\" unpacked with wrong size!
- fi
- # end of 'PATCHES'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(742 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X$Id: README,v 1.2 92/11/17 20:32:26 wolf Exp $
- X
- X(for availabilities, see the ANNOUNCE file)
- X
- If you modify this package PLEASE drop me a note so that there is a
- unique up to date version in distribution.
- X
- There is a discussion list for this product, and Unix LISTSERVs in general,
- if you wish to subsribe to it, send a request to <listserv@grasp1.univ-lyon1.fr>
- containing in the message body (not in the header) the command:
- X
- SUB LISTNIX Last First Name
- X
- X(example: SUB LISTNIX James Bond)
- X
- Complete installation requires root acces, but the LISTSERV daemon does
- X*not* run under super user id.
- X
- Please read the files COPYRIGHT and AUTHORS for information about the
- authors.
- X
- Christophe Wolfhugel | Email: Christophe.Wolfhugel@univ-lyon1.fr
- END_OF_FILE
- if test 742 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'VERSIONS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'VERSIONS'\"
- else
- echo shar: Extracting \"'VERSIONS'\" \(1735 characters\)
- sed "s/^X//" >'VERSIONS' <<'END_OF_FILE'
- This document describes how version numbers are handled within TULP.
- Should this help you have upgrade processes as easy as possible.
- At the end of this document, you'll find the history of the releases.
- X
- X 3.0.0
- X ! ! !
- X ! ! +- Patchlevel (counts up on every single release)
- X ! +--- New minor features (e.g. options in config)
- X +----- Major features and rewrites (new functionality)
- X
- Patchlevel
- X
- X Count up the patchlevel number to distinguish between the
- X various releases. This is important so we can tell if the
- X problem someone is experiencing is already supposed to be
- X fixed in his/her version.
- X
- New minor features
- X
- X Count up with new features that will not need anything to be
- X changed in configuration. New features in this class should
- X have the old behaviour as default. Anyone can upgrade at this
- X level without needing to change any files.
- X
- Major features and rewrites
- X
- X Count up with such new functionality and features that require
- X changes in any of the configuration files. This includes all
- X the list configuration files and MTA files (like sendmail.cf,
- X aliases, etc).
- X
- X-----------------------------------------------------------------------
- X
- History
- X
- X 3.0.2 92/12 Second patch to 3.0, lots of cleanup stuff.
- X
- X 3.0.1 92/11 First patch to 3.0.
- X
- X 3.0.0 92/09 Third release, new design modifications.
- X
- X 2.00 92/05 First widely released version.
- X
- X 1.x0 91-92 Experimental initial release, the current source tree
- X does not have lots of stuff in common anymore with
- X the actual one [museum piece even discarded by
- X the author].
- END_OF_FILE
- if test 1735 -ne `wc -c <'VERSIONS'`; then
- echo shar: \"'VERSIONS'\" unpacked with wrong size!
- fi
- # end of 'VERSIONS'
- fi
- if test -f 'WHERE' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'WHERE'\"
- else
- echo shar: Extracting \"'WHERE'\" \(1360 characters\)
- sed "s/^X//" >'WHERE' <<'END_OF_FILE'
- XFollowing sites have accepted to make TULP and its updates available
- via anonymous ftp. Please use the one closest to your site when
- fetching a copy of the package.
- X
- X--- Author's sites -------------------------------------------------
- X
- Anonymous ftp to grasp1.univ-lyon1.fr [134.214.100.25]
- X /pub/unix/mail/tulp [directory]
- X
- Anonymous ftp to lut.fi [157.24.10.8]
- X /pub/tulp [directory]
- X
- X--- Other shadowing sites ------------------------------------------
- X
- Anonymous ftp to nic.funet.fi [128.214.6.100]
- X /pub/unix/mail/servers/tulp-3.0.?.tar.Z
- X
- Anonymous ftp to ftphost.comp.vuw.ac.nz [130.195.5.12]
- X /pub/mail/tulp-3.0.?.tar.Z
- X
- Anonymous ftp to ftp.vifp.monash.edu.au [130.194.124.128]
- X /pub/src/mail/tulp [directory]
- X
- Anonymous ftp to ftp.zrz.tu-berlin.de [130.149.4.50]
- X /pub/mail/server/tulp [directory]
- X
- X--- New releases ---------------------------------------------------
- X
- If you wish to be informed of releases of new versions or patches
- you may subscribe to the "tulp-dist" mailing list. To do so, send
- a mail to <listserv@grasp1.univ-lyon1.fr> with a command like:
- X
- sub tulp-dist Firstname Lastname
- X
- The command must not be in the subject of the mail but in the body of
- the message. This list will only be informed of new released, discussion
- about TULP goes to another list (described in the package).
- END_OF_FILE
- if test 1360 -ne `wc -c <'WHERE'`; then
- echo shar: \"'WHERE'\" unpacked with wrong size!
- fi
- # end of 'WHERE'
- fi
- if test -f 'WORKING' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'WORKING'\"
- else
- echo shar: Extracting \"'WORKING'\" \(1534 characters\)
- sed "s/^X//" >'WORKING' <<'END_OF_FILE'
- X$Id: WORKING,v 1.1 92/06/07 23:14:29 kim Exp $
- X
- The Unix Listserv Program (TULP) is a project involving multiple
- development sites. To aid working with the same sources at many
- sites all at once we have used the Revision Control System (RCS)
- from the GNU Project.
- X
- If you plan to make any changes, enhancements or fixes to the
- program, we suggest using RCS yourself. Get the latest sources
- for RCS from any GNU redistribution site - we are using v5.6.
- Once you have all the files of TULP in one directory, create a
- directory called RCS, and check everything into RCS with the -k
- option. This will preserve the RCS keyword values already in
- the distributed files. Here is the procedure:
- X
- X % mkdir tulp
- X % chdir tulp
- X % zcat ../tulp-200.tar.Z | tar -xvf -
- X % mkdir RCS
- X % ci -k *
- X
- Once you have made changes and wish to contribute to the TULP
- project, get the changes you have made using rcsdiff against the
- original released version. You might want to start your own
- branch if you like to save checkpoint versions of your own work.
- X
- I do know there is a package called CVS that might handle this
- kind of work better. However, I don't currently have a working
- version of CVS installed, and I am not really aware of all the
- procedures needed for using CVS. If someone would like to shed
- some light about this, please do so!
- X
- All code changes are preferred in a context diff format. Please
- send diffs through e-mail to the authors.
- X
- Kimmo Suominen <Kimmo.Suominen@lut.fi>
- Christophe Wolfhugel <Christophe.Wolfhugel@univ-lyon1.fr>
- END_OF_FILE
- if test 1534 -ne `wc -c <'WORKING'`; then
- echo shar: \"'WORKING'\" unpacked with wrong size!
- fi
- # end of 'WORKING'
- fi
- if test -f 'ad.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ad.c'\"
- else
- echo shar: Extracting \"'ad.c'\" \(2622 characters\)
- sed "s/^X//" >'ad.c' <<'END_OF_FILE'
- X/*-------------------------------------------------------------------------
- X * Listserv - Unix Mailing List manager (sub-set of FRECP's
- X * Bitnet Listserv tool.
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X *----------------------------------------------------------------------*/
- X
- static char rcsid[] = "@(#)$Id: ad.c,v 1.5 93/03/02 22:46:33 wolf Exp $";
- X
- X#include <stdio.h>
- X#include <string.h>
- X#include "conf.h"
- X#include "ext.h"
- X
- static char *adrs,*name;
- static char line[3][MAXLINE];
- X
- void adChange(s)
- char *s;
- X{
- X int state,i,j,quote=0,parlvl=0;
- X char *lns[3],*save=s;
- X
- X state=0; memset(line[0],0,sizeof(line));
- X lns[0]=line[0]; lns[1]=line[1]; lns[2]=line[2];
- X while (*s!=0) {
- X if (*s=='"') quote=1-quote;
- X if (quote==1) { *lns[state]++= *s; s++; continue; }
- X switch (*s) {
- X case '<':
- X state=1;
- X break;
- X case '(':
- X parlvl++;
- X state=2;
- X if (parlvl > 1) *lns[state]++ = '(';
- X break;
- X case '>':
- X state=0;
- X break;
- X case ')':
- X if (--parlvl) { *lns[state]++ = ')'; break; }
- X state=0;
- X break;
- X default:
- X *lns[state]++= *s;
- X } /* endswitch */
- X s++;
- X } /* endwhile */
- X lns[0]=line[0]; lns[1]=line[1]; lns[2]=line[2];
- X for (i=0; i<2; i++) {
- X while (*lns[i]==' ') lns[i]++;
- X j=strlen(lns[i]);
- X while (j>0 && lns[i][j-1]==' ') lns[i][--j]=0;
- X } /* endfor */
- X if (lns[1][0]!=0) { /* Adress between <> */
- X adrs=lns[1];
- X name=lns[0];
- X } else {
- X adrs=lns[0];
- X name=lns[2];
- X } /* endif */
- X if (strchr(adrs,'@')==NULL && strchr(adrs,'!')==NULL) {
- X strcat(adrs,"@");
- X strcat(adrs,HOST);
- X } /* endif */
- X if (*name!=0) sprintf(save,"%s (%s)",adrs,name); else strcpy(save,adrs);
- X}
- END_OF_FILE
- if test 2622 -ne `wc -c <'ad.c'`; then
- echo shar: \"'ad.c'\" unpacked with wrong size!
- fi
- # end of 'ad.c'
- fi
- if test -f 'ad.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ad.h'\"
- else
- echo shar: Extracting \"'ad.h'\" \(356 characters\)
- sed "s/^X//" >'ad.h' <<'END_OF_FILE'
- X/* $Id: ad.h,v 1.1 92/05/23 14:04:40 kim Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * $Log: ad.h,v $
- X * Revision 1.1 92/05/23 14:04:40 kim
- X * External definitions from ad.c
- X *
- X */
- X
- extern void adChange(char*);
- END_OF_FILE
- if test 356 -ne `wc -c <'ad.h'`; then
- echo shar: \"'ad.h'\" unpacked with wrong size!
- fi
- # end of 'ad.h'
- fi
- if test -f 'conf.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'conf.h'\"
- else
- echo shar: Extracting \"'conf.h'\" \(6401 characters\)
- sed "s/^X//" >'conf.h' <<'END_OF_FILE'
- X/* $Id: conf.h,v 1.23 93/03/15 20:54:39 wolf Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X * Configuration information for use by LISTSERV.
- X * Change these as appropriate for your system.
- X *
- X */
- X
- X/*
- X * TULPDIR defines the directory where all service files are accessible,
- X * such as list of lists, etc... TULP chdir()'s to that at startup.
- X */
- X
- X#define TULPDIR "/home/listserv/expl"
- X
- X/*
- X * PIDFILE is the file where listserv will write it's pid. This file
- X * must be world readable (thus verify the directory tree access) and
- X * will not be written by a super-user process, meaning it can't be
- X * placed in /etc or like. The "make install" will create the
- X * /usr/local/etc/tulp directory with appropriate rights.
- X */
- X
- X#define PIDFILE "/usr/local/etc/tulp/tulp.pid"
- X
- X/*
- X * Place where programs sendmail and mailx lie on your system.
- X *
- X * To run sendmail in background use "-odb" instead of "-odi".
- X * This will result in faster LISTSERV replies, but increases
- X * load on your system because of the many sendmail processes.
- X *
- X * Note: with the new "windowed" popen, it is preferable to use
- X * the interactive delivery mode.
- X */
- X
- X#define SENDMAIL "/usr/lib/sendmail -oi -odi -oem -oMrTULP"
- X#define MAILX "/usr/bin/mailx"
- X
- X/*
- X * Following string is the shutdown command, when sent to the listserv
- X * makes a clean and safe shutdown. Useful if there are several admins
- X * some may not have access to the system running it.
- X *
- X * Change this from the default! Multi words is OK.
- X *
- X * If undefined, the option is not hardcoded. Don't forget the
- X * newline in the string.
- X */
- X
- X#define SHUTDOWN "shitdown\n"
- X
- X/*
- X * Place, where incoming mail for LISTSERV is spooled.
- X */
- X
- X#define MAILFILE "/usr/mail/listserv"
- X
- X/*
- X * If you don't have support for syslog, but want a facsimile,
- X * define FAKESYSLOG to be the name of a file to which to log stuff,
- X * otherwise the standard syslog will be used.
- X *
- X * #define FAKESYSLOG "/usr/adm/listlog"
- X *
- X */
- X
- X#undef FAKESYSLOG "syslog"
- X
- X/*
- X * This is frequently used text, rename to fit your needs
- X */
- X
- X#define VERSION "3.0.3" /* No longer than this! */
- X
- X/*
- X * If undefined then the statistics junk at the end of a command message
- X * about CPU usage and other stuff will not be sent to the user.
- X * Some dislike to get those lines.
- X */
- X
- X#define CPUTYPE "MyUNIXstuff" /* Put your CPU type here */
- X
- X/*
- X * NICENESS is the process priority decrement to be used.
- X *
- X * Usually message forwarding is not considered critical and thus
- X * you should choose a value over 0. If the normal priority on
- X * your system is 20, then 19 is the maximum niceness you should
- X * use, because the lowest priority is usually 39. Using values
- X * above that (more decrement) may cause unpredictable results.
- X * Under HP-UX your process might get stuck sometimes when using
- X * an invalid value.
- X */
- X
- X#define NICENESS 18
- X
- X/*
- X * BATCHSIZE is the maximum number of recipients in each batch sent.
- X * Does not limit the number of people on any single list.
- X * Use a value between 20 to 50, do NOT exceed 50.
- X * The smaller the value, the more often sendmail will be called.
- X * If you run sendmail in background, a small value results in many
- X * sendmail processes running for a large list!
- X */
- X
- X#define BATCHSIZE 50
- X
- X/*
- X * Define ADD_SENDER, if you want a "Sender: list-errors" header.
- X * This implies the need of the list-errors alias to someone (not listserv).
- X * If your mail agent handles correctly envelopes and if you did trust listserv
- X * and if you use ADD_REQUEST it might be possible to keep this undefined.
- X */
- X
- X#undef ADD_SENDER /* Sender */
- X
- X/*
- X * Define ADD_REQUEST, if you prefer envelope sender of listname-request.
- X * Also, listserv job requests will be from listserv-request, so you will
- X * need that defined as an alias to someone (not listserv itself).
- X * This needs listserv as a trusted user in your sendmail configuration.
- X * Add a line like "Tlistserv" after the other T-lines in "sendmail.cf".
- X *
- X * It is strongly recommended to keep this line defined (and create
- X * the appropriate aliases, listserv-request and xxx-request for
- X * each list). By undefining this option you may reate loops
- X * in case of error messages being bounced. Take care...
- X */
- X
- X#define ADD_REQUEST /* -fxxx-request to sendmail */
- X
- X/*
- X * If you want the Received: headers to be stripped from incoming
- X * messages (to be redistributed) define this option.
- X * Default is undefined and it is extremely dangerous to strip those
- X * vital lines. You may generate deadly loops, for you and for the
- X * network if you define this.
- X */
- X
- X#undef STRIP_RECEIVED /* Keep undefined please */
- X
- X/*
- X * If the signals (SIGUSR1 only) are not working fine on you system
- X * (CPU loops or whatsoever) then define following. Instead of
- X * waiting on the deliver signal, listserv will check every
- X * NO_SIGUSR1 seconds for a new message.
- X */
- X
- X/* #define NO_SIGUSR1 60 /* 1 min is a good delay */
- X
- X/*
- X * Choose one of the three ways to get your hostname
- X * 1) USE_GETHOSTNAME use gethostname followed by gethostbyname
- X * 2) USE_UNAME use uname followed by gethostbyname
- X * 3) HOST use the static string - cannot share the executable
- X *
- X * Using gethostbyname in 2) and 3) will result in your fully qualified
- X * domain name (FQDN), if your system is properly configured. That is,
- X * if you don't use Domain Name Service, the FQDN must be the first name
- X * for your address in /etc/hosts or NIS-map hosts.byname. This is the
- X * standard way, so there should be no trouble.
- X */
- X
- X#define USE_GETHOSTNAME /* Use gethostname and gethostbyname */
- X#undef USE_UNAME /* Use uname and gethostbyname */
- X/* #define HOST "host.foo.bar" /* Max 50 characters */
- X
- X
- X/*
- X * If your system does not have the strcase functions, define
- X * following option.
- X */
- X
- X#undef NEED_STRCASE /* Need strcasecmp and strncasecmp */
- X
- X
- X/*
- X * You should probably better not change following defines, but in case
- X * the defaults do not fit your needs. Be sure of what you do.
- X * Those values have been fetched from Sendmail-IDA (conf.h) and are
- X * unchanged for TULP.
- X */
- X
- X#define MAXLINE 1024 /* max line length */
- X#define MAXFIELD 4096 /* max total length of a hdr field */
- X
- X/*----- STOP ---- no more modifications below ----- STOP ----------*/
- X
- X#include "internal.h"
- END_OF_FILE
- if test 6401 -ne `wc -c <'conf.h'`; then
- echo shar: \"'conf.h'\" unpacked with wrong size!
- fi
- # end of 'conf.h'
- fi
- if test -f 'deliver' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'deliver'\"
- else
- echo shar: Extracting \"'deliver'\" \(809 characters\)
- sed "s/^X//" >'deliver' <<'END_OF_FILE'
- X#!/bin/sh
- X#
- X# $Id: deliver,v 1.3 92/07/14 15:40:33 wolf Exp $
- X#
- X# Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X#
- X# Please read the files COPYRIGHT and AUTHORS for the extended
- X# copyrights refering to this file.
- X#
- X# $Log: deliver,v $
- X# Revision 1.3 92/07/14 15:40:33 wolf
- X# Changed directory for deliver
- X#
- X# Revision 1.2 92/07/11 20:12:41 wolf
- X# Added X-Listserv-To: support
- X#
- X# Revision 1.1 92/02/18 15:51:06 listserv
- X# Initial revision
- X#
- X# Deliver program -- Used to deliver the incoming message and send signal
- X# to the listserv.
- X#
- X# Customize according to your system.
- X#
- X#
- X# IMPORTANT: put here your LOCAL mailer definition, otherwise you will
- X# create a loop!
- X#
- X( /usr/bin/echo "X-Listserv-To: $1"; /usr/bin/cat - ) | \
- X/usr/bin/mail -d listserv
- X/usr/local/etc/tulp/kilst
- END_OF_FILE
- if test 809 -ne `wc -c <'deliver'`; then
- echo shar: \"'deliver'\" unpacked with wrong size!
- fi
- # end of 'deliver'
- fi
- if test -f 'ext.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ext.h'\"
- else
- echo shar: Extracting \"'ext.h'\" \(583 characters\)
- sed "s/^X//" >'ext.h' <<'END_OF_FILE'
- X/* $Id: ext.h,v 1.8 93/03/02 22:33:09 wolf Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X */
- X
- X/*
- X * Extern definitions, don't touch!
- X */
- X
- extern char vers[], buf[MAXLINE], rcpt[MAXLINE];
- extern char versFrom[],versHost[];
- extern char From[],To[];
- extern long msgSize;
- extern void versInit();
- X
- extern int Debug;
- X
- X#ifdef ADD_SENDER
- extern char versSender[];
- X#endif
- X
- X#if defined(USE_UNAME) || defined(USE_GETHOSTNAME)
- extern char myname[];
- X#endif
- END_OF_FILE
- if test 583 -ne `wc -c <'ext.h'`; then
- echo shar: \"'ext.h'\" unpacked with wrong size!
- fi
- # end of 'ext.h'
- fi
- if test -f 'fakesyslog.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fakesyslog.c'\"
- else
- echo shar: Extracting \"'fakesyslog.c'\" \(2580 characters\)
- sed "s/^X//" >'fakesyslog.c' <<'END_OF_FILE'
- X#ifndef lint
- static char *sccsid = "@(#)$Id: fakesyslog.c,v 1.3 92/05/23 14:02:01 kim Exp $";
- X#endif
- X
- X/*
- X * Fake syslog routines for systems that don't have syslog.
- X * Taken from an idea by Paul McKenny, <mckenny@sri-unix.arpa>.
- X * (Unfortunately, Paul, I can't distribute the real syslog code
- X * as you suggested ... sigh.)
- X *
- X * Warning: this file contains joe code that may offend you.
- X */
- X
- X#include "conf.h"
- X
- X#ifdef FAKESYSLOG
- X
- X#include "fakesyslog.h"
- X
- X#include <stdio.h>
- X#include <sys/signal.h>
- X#include <sys/types.h>
- X
- X#ifdef FCNTL
- X#include <fcntl.h>
- X#endif
- X
- extern int errno;
- extern int sys_nerr;
- extern char *sys_errlist[];
- X
- static FILE *logfp;
- static int failed = 0;
- static char *ident = "syslog";
- static int opt = 0;
- static int fac = 0;
- X
- extern char *strcpy(), *strcat(), *ctime();
- extern time_t time();
- X
- X/* ARGSUSED */
- resetlog(notused)
- X int notused;
- X{
- X closelog();
- X failed = 0;
- X if (logfp == NULL) {
- X openlog(ident, opt, fac);
- X if (logfp == NULL) {
- X failed = 1;
- X return;
- X }
- X }
- X}
- X
- openlog(newident,logopt,facility)
- X char *newident;
- X int logopt, facility;
- X{
- X logfp = fopen(FAKESYSLOG, "a");
- X
- X (void)signal(SIGHUP, resetlog);
- X
- X if (newident && *newident)
- X ident = newident;
- X opt = logopt;
- X fac = facility;
- X}
- X
- closelog()
- X{
- X if (logfp) {
- X (void)fclose(logfp);
- X failed = 0;
- X logfp = NULL;
- X }
- X}
- X
- X/*ARGSUSED*/
- setlogmask(maskpri)
- X int maskpri;
- X{
- X}
- X
- syslog(pri, msg, x1, x2, x3, x4, x5, x6)
- X int pri;
- X char *msg, *x1, *x2, *x3, *x4, *x5, *x6;
- X{
- X char buf[1024];
- X char *cp, *bp;
- X time_t clock;
- X
- X if (failed)
- X return;
- X
- X if (logfp == NULL) {
- X openlog(ident, opt, fac);
- X if (logfp == NULL) {
- X failed = 1;
- X return;
- X }
- X }
- X
- X (void) time(&clock);
- X (void) strcpy(buf, ctime(&clock)+4);
- X *(bp = buf + 16) = '\0';
- X
- X (void) sprintf(bp, "localhost %s", ident ? ident : "");
- X bp += strlen(bp);
- X
- X if (opt&LOG_PID) {
- X /* don't cache getpid() - who knows when we'll fork() */
- X (void) sprintf(bp, "[%d]", getpid());
- X bp += strlen(bp);
- X }
- X
- X if (ident) {
- X (void) strcat(bp, ": ");
- X bp += 2;
- X } else {
- X (void) strcat(bp, " ");
- X bp ++;
- X }
- X
- X for (cp = msg; *cp; cp++) {
- X if (*cp == '%' && cp[1] == 'm') {
- X *bp = '\0';
- X if (errno >= sys_nerr || errno < 0) {
- X char work[32];
- X (void)sprintf(work, "unknown error #%d", errno);
- X (void)strcat(bp, work);
- X } else
- X (void)strcat(bp, sys_errlist[errno]);
- X bp = buf + strlen(buf);
- X cp++;
- X } else {
- X *bp++ = *cp;
- X }
- X }
- X *bp = '\0';
- X /* Ah, the semantic security of C ... */
- X if (bp[-1] != '\n')
- X (void) strcat(bp, "\n");
- X
- X fprintf(logfp, buf, x1, x2, x3, x4, x5, x6);
- X (void) fflush(logfp);
- X}
- X
- X#endif
- END_OF_FILE
- if test 2580 -ne `wc -c <'fakesyslog.c'`; then
- echo shar: \"'fakesyslog.c'\" unpacked with wrong size!
- fi
- # end of 'fakesyslog.c'
- fi
- if test -f 'fakesyslog.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fakesyslog.h'\"
- else
- echo shar: Extracting \"'fakesyslog.h'\" \(1082 characters\)
- sed "s/^X//" >'fakesyslog.h' <<'END_OF_FILE'
- X/*
- X * Fake syslog definitions.
- X *
- X * @(#)fakesyslog.h 1.1 (Berkeley) 12/18/87
- X * $Id: fakesyslog.h,v 1.2 92/05/23 14:06:18 kim Exp $
- X */
- X
- X#ifdef FAKESYSLOG
- X
- X/*
- X * Functions
- X */
- X
- int resetlog(), openlog(), closelog(), setlogmask(), syslog();
- X
- X/*
- X * Facility codes
- X */
- X
- X#define LOG_KERN 0
- X#define LOG_USER 0
- X#define LOG_MAIL 0
- X#define LOG_DAEMON 0
- X#define LOG_AUTH 0
- X#define LOG_SYSLOG 0
- X#define LOG_LPR 0
- X#define LOG_NEWS 0
- X#define LOG_LOCAL0 0
- X#define LOG_LOCAL1 0
- X#define LOG_LOCAL2 0
- X#define LOG_LOCAL3 0
- X#define LOG_LOCAL4 0
- X#define LOG_LOCAL5 0
- X#define LOG_LOCAL6 0
- X#define LOG_LOCAL7 0
- X
- X#define LOG_NFACILITIES 0
- X#define LOG_FACMASK 0
- X
- X/*
- X * Priorities
- X */
- X
- X#define LOG_EMERG 0
- X#define LOG_ALERT 0
- X#define LOG_CRIT 0
- X#define LOG_ERR 0
- X#define LOG_WARNING 0
- X#define LOG_NOTICE 0
- X#define LOG_INFO 0
- X#define LOG_DEBUG 0
- X
- X#define LOG_PRIMASK 0
- X
- X/*
- X * arguments to setlogmask.
- X */
- X
- X#define LOG_MASK(pri) 0
- X#define LOG_UPTO(pri) 0
- X
- X/*
- X * Option flags for openlog.
- X */
- X
- X#define LOG_PID 1
- X#define LOG_CONS 0
- X#define LOG_ODELAY 0
- X#define LOG_NDELAY 0
- X#define LOG_NOWAIT 0
- X
- X#endif
- END_OF_FILE
- if test 1082 -ne `wc -c <'fakesyslog.h'`; then
- echo shar: \"'fakesyslog.h'\" unpacked with wrong size!
- fi
- # end of 'fakesyslog.h'
- fi
- if test -f 'helpfile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'helpfile'\"
- else
- echo shar: Extracting \"'helpfile'\" \(1805 characters\)
- sed "s/^X//" >'helpfile' <<'END_OF_FILE'
- X$Revision: 1.3 $
- X
- X LISTSERV -- User's Guide
- X -----------------------------
- X
- X Version 3, December 1992
- X
- This version of listserv is a subset of the original one that runs under VM
- on lots of Bitnet nodes.
- X
- This tool was firstly designed to act as a relay for Bitnet/Internet lists
- and as an archive-server (on a monthly basis). It's also possible to create
- locally administred lists on node HOST.FOO.BAR, but my package does
- not know of "owners" and other administrative functions. So anyone can
- subscribe and contribute to any list he wishes.
- X
- Commands must be sent to <listserv@host.foo.bar> in a message without
- subject.
- X
- Available verbs are:
- X
- X HELp * Sends this help file
- X LISt * Relayed conferences
- X REView list * Subscribers from a list
- X SUBscribe list Your name * Register to a list
- X SIGnoff list * End of subscription
- X
- X INDex list * Index of files for a list
- X GET list file * Get a file
- X
- X ADD list user@host User Name * Add a User (Owner only)
- X DEL list user@host * Delete a User (Owner Only)
- X
- Warning: some lists are archived.
- X
- XExample:
- X
- X SUB minix-l Christophe Wolfhugel
- X SIG minix-l
- X REV ibmpc-l
- X LIS
- X
- Requests are automatically treated by software, so if you get any problem with
- it don't hesitate to drop me a message. Response time (for local senders) is
- generrally under 1mn, except on very high loads. If you don't get the answer
- fast, maybe the listserv is down...
- X
- XEmail accounts:
- X
- X listman@host.foo.bar For any technical or administrative query.
- X list-errors@host.foo.bar Error reports.
- X listserv@host.foo.bar Requests (SUB, HELP, ...)
- END_OF_FILE
- if test 1805 -ne `wc -c <'helpfile'`; then
- echo shar: \"'helpfile'\" unpacked with wrong size!
- fi
- # end of 'helpfile'
- fi
- if test -f 'internal.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'internal.h'\"
- else
- echo shar: Extracting \"'internal.h'\" \(339 characters\)
- sed "s/^X//" >'internal.h' <<'END_OF_FILE'
- X/* $Id: internal.h,v 1.4 92/12/04 09:12:35 wolf Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X */
- X
- X#if defined(USE_UNAME) || defined(USE_GETHOSTNAME)
- X# define HOST myname /* Holds your name */
- X#endif
- END_OF_FILE
- if test 339 -ne `wc -c <'internal.h'`; then
- echo shar: \"'internal.h'\" unpacked with wrong size!
- fi
- # end of 'internal.h'
- fi
- if test -f 'k.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'k.c'\"
- else
- echo shar: Extracting \"'k.c'\" \(1548 characters\)
- sed "s/^X//" >'k.c' <<'END_OF_FILE'
- X/*-------------------------------------------------------------------------
- X * Listserv - Unix Mailing List manager (sub-set of FRECP's
- X * Bitnet Listserv tool.
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *----------------------------------------------------------------------*/
- X
- static char rcsid[] = "@(#)$Id: k.c,v 1.1 92/02/18 15:51:57 listserv Exp $";
- X
- X/*
- X * $Log: k.c,v $
- X * Revision 1.1 92/02/18 15:51:57 listserv
- X * Initial revision
- X *
- X */
- X
- X#include <stdio.h>
- X#include <signal.h>
- X#include "conf.h"
- X
- void main()
- X{
- X FILE *f;
- X unsigned int pid;
- X int rc;
- X
- X f=fopen(PIDFILE,"r");
- X if (f==NULL) exit(0);
- X rc=fscanf(f,"%u",&pid);
- X fclose(f);
- X if (rc>0) kill(pid,SIGUSR1);
- X exit(0);
- X}
- END_OF_FILE
- if test 1548 -ne `wc -c <'k.c'`; then
- echo shar: \"'k.c'\" unpacked with wrong size!
- fi
- # end of 'k.c'
- fi
- if test -f 'l.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'l.h'\"
- else
- echo shar: Extracting \"'l.h'\" \(389 characters\)
- sed "s/^X//" >'l.h' <<'END_OF_FILE'
- X/* $Id: l.h,v 1.1 92/05/23 14:05:45 kim Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * $Log: l.h,v $
- X * Revision 1.1 92/05/23 14:05:45 kim
- X * External definitions from l.c
- X *
- X */
- X
- char *strlwr(char*), *strupr(char*);
- void mailMsg(char*, char*);
- END_OF_FILE
- if test 389 -ne `wc -c <'l.h'`; then
- echo shar: \"'l.h'\" unpacked with wrong size!
- fi
- # end of 'l.h'
- fi
- if test -f 'lc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lc.h'\"
- else
- echo shar: Extracting \"'lc.h'\" \(388 characters\)
- sed "s/^X//" >'lc.h' <<'END_OF_FILE'
- X/* $Id: lc.h,v 1.1 92/05/23 14:03:23 kim Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * $Log: lc.h,v $
- X * Revision 1.1 92/05/23 14:03:23 kim
- X * External definitions from lc.c
- X *
- X * External definitions from lc.c
- X */
- X
- extern void listservCmd();
- END_OF_FILE
- if test 388 -ne `wc -c <'lc.h'`; then
- echo shar: \"'lc.h'\" unpacked with wrong size!
- fi
- # end of 'lc.h'
- fi
- if test -f 'lists' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lists'\"
- else
- echo shar: Extracting \"'lists'\" \(70 characters\)
- sed "s/^X//" >'lists' <<'END_OF_FILE'
- X# List of active lists
- X# List name, list description
- X#
- test,Test List
- END_OF_FILE
- if test 70 -ne `wc -c <'lists'`; then
- echo shar: \"'lists'\" unpacked with wrong size!
- fi
- # end of 'lists'
- fi
- if test -f 'lp.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lp.c'\"
- else
- echo shar: Extracting \"'lp.c'\" \(7665 characters\)
- sed "s/^X//" >'lp.c' <<'END_OF_FILE'
- X/*-------------------------------------------------------------------------
- X * Listserv - Unix Mailing List manager (sub-set of FRECP's
- X * Bitnet Listserv tool.
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *----------------------------------------------------------------------*/
- X
- static char rcsid[] = "@(#)$Id: lp.c,v 1.11 92/12/04 09:15:55 wolf Exp $";
- X
- X/*
- X * $Log: lp.c,v $
- X * Revision 1.11 92/12/04 09:15:55 wolf
- X * Updated some syslog defines
- X *
- X * Revision 1.10 92/07/14 15:43:09 wolf
- X * Authorized comments in lists; removed third field in file.
- X *
- X * Revision 1.9 92/06/12 07:11:21 listserv
- X * Initial 2.00 release
- X *
- X */
- X
- X#include <stdio.h>
- X#include <string.h>
- X#include <stdlib.h>
- X#include <unistd.h>
- X#include <sys/param.h>
- X#include <sys/types.h>
- X#include <sys/stat.h>
- X#include <dirent.h>
- X#include <sys/times.h>
- X#include "conf.h"
- X#include "ext.h"
- X#include "str.h"
- X#include <limits.h>
- X#ifdef FAKESYSLOG
- X# include "fakesyslog.h"
- X#else
- X# include <syslog.h>
- X#endif
- X
- extern char From[],To[];
- X
- struct ITEM {
- X struct ITEM *next;
- X char *value;
- X};
- X
- static struct ITEM *commentList=NULL,*commentPtr=NULL;
- static struct ITEM *editorList=NULL,*editorPtr=NULL;
- static struct ITEM *ownerList=NULL,*ownerPtr=NULL;
- static struct ITEM *userList=NULL,*userPtr=NULL;
- X
- static char review[16],send[16],subscription[16];
- static char lname[64],replyto[128],errorsto[128];
- X
- static char buf2[512];
- X
- int IsEditor(char *s)
- X{
- X struct ITEM *p;
- X
- X for (p=editorList; p!=NULL; p=p->next) {
- X if (strspacecmp(p->value,s)==0) return(1);
- X } /* endfor */
- X return(0);
- X}
- X
- int IsOwner(char *s)
- X{
- X struct ITEM *p;
- X
- X for (p=ownerList; p!=NULL; p=p->next) {
- X if (strspacecmp(p->value,s)==0) return(1);
- X } /* endfor */
- X return(0);
- X}
- X
- int IsUser(char *s)
- X{
- X struct ITEM *p;
- X
- X for (p=userList; p!=NULL; p=p->next) {
- X if (strspacecmp(p->value,s)==0) return(1);
- X } /* endfor */
- X return(0);
- X}
- X
- void RewindUserList()
- X{
- X userPtr=userList;
- X}
- X
- char *GetUser(char *s)
- X{
- X struct ITEM *p;
- X
- X if (userPtr==NULL) return(NULL);
- X p=userPtr; userPtr=userPtr->next;
- X if (s!=NULL) strcpy(s,p->value);
- X return(p->value);
- X}
- X
- void RewindCommentList()
- X{
- X commentPtr=commentList;
- X}
- X
- char *GetComment(char *s)
- X{
- X struct ITEM *p;
- X
- X if (commentPtr==NULL) return(NULL);
- X p=commentPtr; commentPtr=commentPtr->next;
- X if (s!=NULL) strcpy(s,p->value);
- X return(p->value);
- X}
- X
- void RewindEditorList()
- X{
- X editorPtr=editorList;
- X}
- X
- char *GetEditor(char *s)
- X{
- X struct ITEM *p;
- X
- X if (editorPtr==NULL) return(NULL);
- X p=editorPtr; editorPtr=editorPtr->next;
- X if (s!=NULL) strcpy(s,p->value);
- X return(p->value);
- X}
- X
- void RewindOwnerList()
- X{
- X ownerPtr=ownerList;
- X}
- X
- char *GetOwner(char *s)
- X{
- X struct ITEM *p;
- X
- X if (ownerPtr==NULL) return(NULL);
- X p=ownerPtr; ownerPtr=ownerPtr->next;
- X if (s!=NULL) strcpy(s,p->value);
- X return(p->value);
- X}
- X
- X
- X/*
- X * Returns: 0 if new entry, 1 if updated.
- X */
- X
- int AddItem(struct ITEM **head,char *s)
- X{
- X struct ITEM *p,*q,*r;
- X
- X q=NULL;
- X for (p= *head; p!=NULL; p=p->next) {
- X if (p->value[0]=='#') { q=p; continue; }
- X if (strspacecmp(s,p->value)==0) {
- X p->value=(char *)realloc(p->value,strlen(s)+1);
- X strcpy(p->value,s);
- X return(1);
- X } /* endif */
- X if (strspacecmp(s,p->value)<0) {
- X r=(struct ITEM *)malloc(sizeof(struct ITEM));
- X r->value=(char *)malloc(strlen(s)+1);
- X if (q==NULL) *head=r; else q->next=r;
- X r->next=p;
- X strcpy(r->value,s);
- X return(0);
- X } /* endif */
- X q=p;
- X } /* endfor */
- X p=(struct ITEM *)malloc(sizeof(struct ITEM));
- X p->value=(char *)malloc(strlen(s)+1);
- X p->next=NULL;
- X strcpy(p->value,s);
- X if (q!=NULL) q->next=p; else *head=p;
- X return(0);
- X}
- X
- X
- X/*
- X * Returns 0 is OK, -1 is key not found
- X */
- X
- int DelItem(struct ITEM **head,char *s)
- X{
- X struct ITEM *p,*q;
- X
- X q=NULL;
- X for (p= *head; p!=NULL; p=p->next) {
- X if (strspacecmp(s,p->value)==0) {
- X if (q==NULL) *head=p->next; else q->next=p->next;
- X free(p->value);
- X free(p);
- X return(0);
- X } /* endif */
- X q=p;
- X } /* endfor */
- X return(-1);
- X}
- X
- int DelUser(char *s)
- X{
- X return(DelItem(&userList,s));
- X}
- X
- int AddUser(char *s)
- X{
- X return(AddItem(&userList,s));
- X}
- X
- void AddEditor(char *s)
- X{
- X AddItem(&editorList,s);
- X}
- X
- void AddOwner(char *s)
- X{
- X AddItem(&ownerList,s);
- X}
- X
- void DelList(struct ITEM **head)
- X{
- X struct ITEM *p;
- X
- X while (*head!=NULL) {
- X p= *head; *head=p->next;
- X free(p->value);
- X free(p);
- X } /* endwhile */
- X *head=NULL;
- X}
- X
- X#define DELIM "# =\r\n\t"
- X
- void parseComment(char *s)
- X{
- X char *kw;
- X
- X kw=strtok(buf2,DELIM);
- X if (kw==NULL) return;
- X if (strcasecmp(kw,"owner")==0) {
- X kw=strtok(NULL,DELIM);
- X if (kw!=NULL) AddItem(&ownerList,kw);
- X return;
- X } /* endif */
- X if (strcasecmp(kw,"editor")==0) {
- X kw=strtok(NULL,DELIM);
- X if (kw!=NULL) AddItem(&editorList,kw);
- X return;
- X } /* endif */
- X if (strcasecmp(kw,"review")==0) {
- X kw=strtok(NULL,DELIM);
- X if (kw!=NULL) strcpy(review,kw);
- X return;
- X } /* endif */
- X if (strcasecmp(kw,"send")==0) {
- X kw=strtok(NULL,DELIM);
- X if (kw!=NULL) strcpy(send,kw);
- X return;
- X } /* endif */
- X if (strcasecmp(kw,"subscription")==0) {
- X kw=strtok(NULL,DELIM);
- X if (kw!=NULL) strcpy(subscription,kw);
- X return;
- X } /* endif */
- X if (strcasecmp(kw,"reply-to")==0) {
- X kw=strtok(NULL,DELIM);
- X if (kw!=NULL) strcpy(replyto,kw);
- X return;
- X } /* endif */
- X if (strcasecmp(kw,"errors-to")==0) {
- X kw=strtok(NULL,DELIM);
- X if (kw!=NULL) strcpy(errorsto,kw);
- X return;
- X } /* endif */
- X}
- X
- X
- X/*
- X * Returns: 0 on success, -1 is list.u file not found
- X */
- X
- int ReadUserList(char *s)
- X{
- X FILE *f;
- X
- X strcpy(review,"all");
- X strcpy(send,"all");
- X strcpy(subscription,"open");
- X strcpy(replyto,"list,respect");
- X errorsto[0]=0;
- X sprintf(lname,"%s.u",s); f=fopen(lname,"r");
- X if (f==NULL) { syslog(LOG_ERR,"can't open %s",lname); return(-1); }
- X while (fgets(buf2,256,f)!=NULL) {
- X strtok(buf2,"\r\n"); if (buf2[0]==0) continue;
- X if (buf2[0]=='#')
- X { AddItem(&commentList,buf2); parseComment(buf2); continue; }
- X AddUser(buf2);
- X } /* endwhile */
- X fclose(f);
- X return(0);
- X}
- X
- void WriteUserList()
- X{
- X FILE *f;
- X
- X f=fopen("tmpfile","w");
- X RewindCommentList(); RewindUserList();
- X while (GetComment(buf2)!=NULL) fprintf(f,"%s\n",buf2);
- X while (GetUser(buf2)!=NULL) fprintf(f,"%s\n",buf2);
- X fclose(f);
- X rename("tmpfile",lname);
- X unlink("tmpfile");
- X}
- X
- void CloseUserList()
- X{
- X DelList(&userList);
- X DelList(&editorList);
- X DelList(&ownerList);
- X DelList(&commentList);
- X}
- X
- char *GetSubscription()
- X{
- X return(subscription);
- X}
- X
- char *GetReview()
- X{
- X return(review);
- X}
- X
- char *GetSend()
- X{
- X return(send);
- X}
- X
- char *GetReplyTo()
- X{
- X return(replyto);
- X}
- X
- char *GetErrorsTo()
- X{
- X return(errorsto);
- X}
- END_OF_FILE
- if test 7665 -ne `wc -c <'lp.c'`; then
- echo shar: \"'lp.c'\" unpacked with wrong size!
- fi
- # end of 'lp.c'
- fi
- if test -f 'lp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lp.h'\"
- else
- echo shar: Extracting \"'lp.h'\" \(1116 characters\)
- sed "s/^X//" >'lp.h' <<'END_OF_FILE'
- X/* $Id: lp.h,v 1.5 92/11/17 20:13:52 wolf Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * $Log: lp.h,v $
- X * Revision 1.5 92/11/17 20:13:52 wolf
- X * Corrected horrible bug for IsXXX(). Proto moved from
- X * char * to int as in lp.c
- X *
- X * Revision 1.4 92/06/12 07:11:28 listserv
- X * Initial 2.00 release
- X *
- X *
- X * External definitions from lp.c
- X */
- X
- extern int IsEditor(char *);
- extern int IsOwner(char *);
- extern int IsUser(char *);
- X
- extern void RewindUserList();
- extern void RewindCommentList();
- extern void RewindEditorList();
- extern void RewindOwnerList();
- X
- extern int AddUser(char *);
- extern int DelUser(char *);
- X
- extern void CloseUserList();
- extern int ReadUserList(char *);
- extern void WriteUserList();
- X
- extern char *GetUser(char *);
- extern char *GetComment(char *);
- extern char *GetEditor(char *);
- extern char *GetOwner(char *);
- X
- extern char *GetErrorsTo();
- extern char *GetReplyTo();
- extern char *GetReview();
- extern char *GetSend();
- extern char *GetSubscription();
- END_OF_FILE
- if test 1116 -ne `wc -c <'lp.h'`; then
- echo shar: \"'lp.h'\" unpacked with wrong size!
- fi
- # end of 'lp.h'
- fi
- if test -f 'messages.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'messages.h'\"
- else
- echo shar: Extracting \"'messages.h'\" \(5426 characters\)
- sed "s/^X//" >'messages.h' <<'END_OF_FILE'
- X/* $Id: messages.h,v 1.3 92/12/04 07:40:16 wolf Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * $Log: messages.h,v $
- X * Revision 1.3 92/12/04 07:40:16 wolf
- X * Added TULP_MAILPRIVATE and TULP_HDRMAILNAK (Dominique Marant)
- X *
- X * Revision 1.2 92/07/13 21:20:51 kim
- X * Moved all messages from lc.c into this file.
- X *
- X * Revision 1.1 1992/07/12 21:51:17 kim
- X * Return messages for various commands.
- X */
- X
- X/* Messages in the execution log. */
- X
- X#define TULP_SYNTAX "\
- X The syntax you have given is wrong.\n\
- X To get a help file send the command 'HELP' to listserv.\n"
- X
- X#define TULP_NOSUCHLIST "\
- X The list specified is not relayed on node %s.\n\
- X To see all relayed lists send the command 'LIST' to listserv.\n",HOST
- X
- X#define TULP_NONESTORED "\
- X Sorry, no files are stored on that list.\n"
- X
- X#define TULP_INDNOFILES "\
- X Sorry, no files were found, an empty index will be sent.\n"
- X
- X#define TULP_GETNOSUCHFILE "\
- X Sorry, the requested file does not exist.\n"
- X
- X#define TULP_REVPRIVATE "\
- X Sorry, you are not allowed to review that list.\n\
- X Only the header of the list will be mailed to you.\n"
- X
- X#define TULP_SUBCLOSED "\
- X Subscriptions to that list are currently closed. Please, try again later.\n"
- X
- X#define TULP_SUBFORWARDED "\
- X Your subscription request has been forwarded to the owner(s) of the list.\n\
- X You will be sent a notification as soon as you get added to the list.\n"
- X
- X#define TULP_NOTONLIST "\
- X Sorry, you are not a subscriber to the list, or your address has changed.\n\
- X Please, resend your request from the original subscription address.\n"
- X
- X#define TULP_SIGDONE "\
- X You have been removed from the list.\n"
- X
- X#define TULP_SUBALREADY "\
- X Your subscription record has been updated.\n"
- X
- X#define TULP_NOTOWNER "\
- X Sorry, you are not an authorized owner on that list.\n"
- X
- X#define TULP_DELSUCCESS "\
- X The user specified has been successfully deleted from the list.\n"
- X
- X#define TULP_DELNOTONLIST "\
- X The user specified was not found on the list.\n"
- X
- X#define TULP_DELINCONSISTENT "\
- X The user was not removed from the list for some reason,\n\
- X even though the address was found on the list. Perhaps\n\
- X there are problems with memory, or there is a bug around.\n"
- X
- X#define TULP_ADDSUCCESS "\
- X The user specified has been successfully added to the list.\n"
- X
- X#define TULP_ADDALREADY "\
- X The subscription record has been updated for the user specified.\n"
- X
- X#define TULP_MAILPRIVATE "\
- X Sorry, you are not a subscriber to the list, or your address has changed.\n\
- X So, you are not allowed to send mail to this list. \n\
- X Please, resend your mail from the original subscription address.\n\
- X \n\
- X ------ Unsent message follows ------\n"
- X
- X
- X/* General problems and comments */
- X
- X#define TULP_NOBODY "\
- X Sorry, I cannot see your message anywhere.\n"
- X
- X#define TULP_NOCOMMANDS "\
- X Sorry, I could not understand a word you said.\n"
- X
- X#define TULP_EXITING "\
- X End of commands detected.\n"
- X
- X#define TULP_SAYWHAT "\
- X Command not understood.\n"
- X
- X#define TULP_OKAY "\
- X Command executed.\n"
- X
- X/* Totals:
- X * p1 - cpu seconds
- X * p2 - cpu type
- X */
- X
- X#define TULP_TOTAL(p1,p2) "\
- X\n\
- Total CPU time: %2.2f seconds\n\
- CPU type: %s\n",p1,p2
- X
- X/* Messages for notifies being mailed
- X *
- X * p1 - subscriber address
- X * p2 - list name
- X * p3 ... - additional
- X */
- X
- X#define TULP_ADDBY(p1,p2,p3) "\
- You have been added to list %s\n\
- as: %s\n\
- by: %s\n\
- X\n",p2,p1,p3
- X
- X#define TULP_SUBUPDATED(p1,p2,p3) "\
- Subject: Your subscription on list '%s'\n\
- To: %s\n\
- X\n\
- Your subscription record on list %s has been updated\n\
- to: %s\n\
- by: %s\n",p2,p1,p2,p1,p3
- X
- X#define TULP_DELREMOVED(p1,p2,p3) "\
- Subject: Your removal from list '%s'\n\
- To: %s\n\
- X\n\
- You have been removed from list %s\n\
- by: %s\n",p2,p1,p2,p3
- X
- X#define TULP_SUBREQUEST(p1,p2,p3) "\
- Subject: SUB %s\n\
- To: Owners of list <%s@%s>\n\
- X\n\
- Dear Owners,\n\
- X\n\
- The following subscription request has been made:\n\
- ADD %s %s %s\n\
- X\n\
- Virtually,\n\
- X\n\
- X The Listserv Management\n",p2,p2,HOST,p2,p1,p3
- X
- X#define TULP_SIGSUCCESS(p1,p2) "\
- Subject: SIG %s\n\
- To: Owners of list <%s@%s>\n\
- X\n\
- Dear Owners,\n\
- X\n\
- User %s\n\
- has been successfully removed from list %s.\n\
- X\n\
- Virtually,\n\
- X\n\
- X The Listserv Management\n",p2,p2,HOST,p1,p2
- X
- X#define TULP_SIGFAILED(p1,p2) "\
- Subject: Failed SIG %s\n\
- To: Owners of list <%s@%s>\n\
- X\n\
- Dear Owners,\n\
- X\n\
- User %s\n\
- was not found on list %s.\n\
- X\n\
- Virtually,\n\
- X\n\
- X The Listserv Management\n",p2,p2,HOST,p1,p2
- X
- X/* Message headers */
- X
- X#define TULP_HDRHELP(p1) "\
- Subject: Usage information\n\
- To: %s\n\
- X\n",p1
- X
- X#define TULP_HDRLIST(p1) "\
- Subject: Relayed lists\n\
- To: %s\n\
- X\n\
- The following lists are realyed at node %s:\n\
- X\n",p1,HOST
- X
- X#define TULP_HDRREV(p1,p2) "\
- Subject: Recipients of list '%s'\n\
- To: %s\n\
- X\n",p2,p1
- X
- X#define TULP_HDRWELCOME(p1,p2) "\
- Subject: Welcome to list '%s'\n\
- To: %s\n\
- X\n",p2,p1
- X
- X#define TULP_HDRINDEX(p1,p2) "\
- Subject: Index of files on list '%s'\n\
- To: %s\n\
- X\n\
- The following files are available on list %s:\n\
- X\n",p2,p1,p2
- X
- X#define TULP_HDRGET(p1,p2,p3) "\
- Subject: File '%s' on list '%s'\n\
- To: %s\n\
- X\n",p3,p2,p1
- X
- X#define TULP_HDROUTPUT(p1) "\
- Subject: Output of your job\n\
- To: %s\n\
- X\n",p1
- X
- X#define TULP_HDRMAILNAK(p1,p2) "\
- Subject: Returned mail: Private list '%s'\n\
- To: %s\n\
- X\n",p2,p1
- X
- X/* $RCSfile: messages.h,v $ */
- END_OF_FILE
- if test 5426 -ne `wc -c <'messages.h'`; then
- echo shar: \"'messages.h'\" unpacked with wrong size!
- fi
- # end of 'messages.h'
- fi
- if test -f 'popen.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'popen.c'\"
- else
- echo shar: Extracting \"'popen.c'\" \(3875 characters\)
- sed "s/^X//" >'popen.c' <<'END_OF_FILE'
- X/* $Id: popen.c,v 1.11 92/12/04 09:16:30 wolf Exp $
- X *
- X * Derived from the original! Mod by Wolf & Kim
- X *
- X * Copyright (c) 1988 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software written by Ken Arnold and
- X * published in UNIX Review, Vol. 6, No. 8.
- X *
- X * Redistribution and use in source and binary forms are permitted
- X * provided that the above copyright notice and this paragraph are
- X * duplicated in all such forms and that any documentation,
- X * advertising materials, and other materials related to such
- X * distribution and use acknowledge that the software was developed
- X * by the University of California, Berkeley. The name of the
- X * University may not be used to endorse or promote products derived
- X * from this software without specific prior written permission.
- X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X *
- X */
- X
- X/* $Log: popen.c,v $
- X * Revision 1.11 92/12/04 09:16:30 wolf
- X * Updates syslog defines
- X *
- X * Revision 1.10 92/11/17 19:55:19 wolf
- X * Changed Debug handling
- X *
- X * Revision 1.9 92/06/28 19:31:35 wolf
- X * Replaced wait with waitpid (Posix compliant) in order to avoid the
- X * defuncts.
- X *
- X * Revision 1.8 92/06/12 07:11:31 listserv
- X * Initial 2.00 release
- X *
- X */
- X
- X#ifndef lint
- static char sccsid[] = "@(#)popen.c 5.7 (Berkeley) 2/14/89";
- X#endif /* not lint */
- X
- X#include "conf.h"
- X#include <sys/types.h>
- X#include <string.h>
- X#include <signal.h>
- X#include <unistd.h>
- X#include <sys/wait.h>
- X#include <stdio.h>
- X#include <stdlib.h>
- X#ifdef FAKESYSLOG
- X# include "fakesyslog.h"
- X#else
- X# include <syslog.h>
- X#endif
- X
- X/*
- X * Special version of popen which avoids call to shell. This insures noone
- X * may create a pipe to a hidden program as a side effect of a list or dir
- X * command.
- X */
- X
- X#define WINSZ 6
- static int win=0;
- X
- static int *pids=NULL;
- static int fds;
- X
- extern int Debug;
- X
- void reapchild()
- X{
- X while (waitpid(-1, NULL, WNOHANG) > 0)
- X win--;
- X}
- X
- void winInc(void)
- X{
- X win++;
- X}
- X
- XFILE * l_popen(char *program, char *type)
- X{
- X register char *cp;
- X FILE *iop;
- X int argc, pdes[2], pid;
- X char *argv[100];
- X
- X if (*type != 'r' && *type != 'w' || type[1])
- X return(NULL);
- X
- X if (!pids) {
- X if ((fds = sysconf(_SC_OPEN_MAX)) <= 0)
- X return(NULL);
- X if ((pids = (int *)malloc((u_int)(fds * sizeof(int)))) == NULL)
- X return(NULL);
- X memset((char *)pids, 0, fds * sizeof(int));
- X }
- X if (pipe(pdes) < 0)
- X return(NULL);
- X
- X /* break up string into pieces */
- X for (argc = 0, cp = program;; cp = NULL)
- X if (!(argv[argc++] = strtok(cp, " \t\n")))
- X break;
- X
- X iop = NULL;
- X switch(pid = fork()) {
- X case -1: /* error */
- X (void)close(pdes[0]);
- X (void)close(pdes[1]);
- X goto pfree;
- X /* NOTREACHED */
- X case 0: /* child */
- X if (*type == 'r') {
- X if (pdes[1] != 1) {
- X dup2(pdes[1], 1);
- X dup2(pdes[1], 2); /* stderr, too! */
- X (void)close(pdes[1]);
- X }
- X (void)close(pdes[0]);
- X } else {
- X if (pdes[0] != 0) {
- X dup2(pdes[0], 0);
- X (void)close(pdes[0]);
- X }
- X (void)close(pdes[1]);
- X }
- X execv(argv[0], argv);
- X _exit(1);
- X }
- X /* parent; assume fdopen can't fail... */
- X if (*type == 'r') {
- X iop = fdopen(pdes[0], type);
- X (void)close(pdes[1]);
- X } else {
- X iop = fdopen(pdes[1], type);
- X (void)close(pdes[0]);
- X }
- X pids[fileno(iop)] = pid;
- X win++;
- X
- pfree:
- X return(iop);
- X}
- X
- l_pclose(FILE *iop)
- X{
- X register int fdes;
- X
- X /*
- X * pclose returns -1 if stream is not associated with a
- X * `popened' command, or, if already `pclosed'.
- X */
- X if (pids == 0 || pids[fdes = fileno(iop)] == 0)
- X return(-1);
- X (void)fclose(iop);
- X if (Debug != 0)
- X fprintf(stderr, "l_pclose: win is %d", win);
- X while (win > WINSZ) sleep(30);
- X pids[fdes] = 0;
- X return(0);
- X}
- END_OF_FILE
- if test 3875 -ne `wc -c <'popen.c'`; then
- echo shar: \"'popen.c'\" unpacked with wrong size!
- fi
- # end of 'popen.c'
- fi
- if test -f 'popen.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'popen.h'\"
- else
- echo shar: Extracting \"'popen.h'\" \(426 characters\)
- sed "s/^X//" >'popen.h' <<'END_OF_FILE'
- X/* $Id: popen.h,v 1.1 92/05/23 14:05:12 kim Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * $Log: popen.h,v $
- X * Revision 1.1 92/05/23 14:05:12 kim
- X * External definitions from popen.c
- X *
- X */
- X
- extern FILE *l_popen(char*, char*);
- extern int l_pclose(FILE*);
- extern void winInc(void);
- END_OF_FILE
- if test 426 -ne `wc -c <'popen.h'`; then
- echo shar: \"'popen.h'\" unpacked with wrong size!
- fi
- # end of 'popen.h'
- fi
- if test -f 'rc.tulp' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rc.tulp'\"
- else
- echo shar: Extracting \"'rc.tulp'\" \(386 characters\)
- sed "s/^X//" >'rc.tulp' <<'END_OF_FILE'
- X#!/bin/sh
- X# Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X#
- X# Please read the files COPYRIGHT and AUTHORS for the extended
- X# copyrights refering to this file.
- X#
- X# Startup file -- Used to start the listerv on system launch.
- X# Customize according to your system. On SysV put this file
- X# with a correct name in /etc/rc2.d
- X#
- su - listserv -c /usr/local/etc/tulp/listserv
- END_OF_FILE
- if test 386 -ne `wc -c <'rc.tulp'`; then
- echo shar: \"'rc.tulp'\" unpacked with wrong size!
- fi
- # end of 'rc.tulp'
- fi
- if test -f 'str.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'str.c'\"
- else
- echo shar: Extracting \"'str.c'\" \(2549 characters\)
- sed "s/^X//" >'str.c' <<'END_OF_FILE'
- X/*-------------------------------------------------------------------------
- X * Listserv - Unix Mailing List manager (sub-set of FRECP's
- X * Bitnet Listserv tool.
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *----------------------------------------------------------------------*/
- X
- static char rcsid[] = "@(#)$Id: str.c,v 1.6 92/09/11 09:51:33 wolf Exp $";
- X
- X/*
- X * $Revision: 1.6 $
- X */
- X
- X#include <stdio.h>
- X#include <string.h>
- X#include <ctype.h>
- X#include "conf.h"
- X
- int strspacecmp(str1, str2)
- char *str1, *str2;
- X{
- X int c1, c2;
- X
- X while (1) {
- X c1 = *str1++;
- X c2 = *str2++;
- X if (isupper(c1)) c1 += 32;
- X if (isupper(c2)) c2 += 32;
- X if (c1==' ' || c1=='\t') c1=0;
- X if (c2==' ' || c2=='\t') c2=0;
- X if (c1 == c2) {
- X if (c1==0)
- X return(0);
- X continue;
- X } /* endif */
- X if (c1 < c2)
- X return -1;
- X return 1;
- X } /* endwhile */
- X}
- X
- X#ifdef NEED_STRCASE
- X
- int strcasecmp(str1, str2)
- char *str1, *str2;
- X{
- X int c1, c2;
- X
- X while (1) {
- X c1 = *str1++;
- X c2 = *str2++;
- X if (isupper(c1)) c1 += 32;
- X if (isupper(c2)) c2 += 32;
- X if (c1 == c2) {
- X if (!c1)
- X return(0);
- X continue;
- X } /* endif */
- X if (c1 < c2)
- X return -1;
- X return 1;
- X } /* endwhile */
- X}
- X
- int strncasecmp(str1, str2, n)
- char *str1, *str2;
- int n;
- X{
- X int c1, c2;
- X
- X while (n--) {
- X c1 = *str1++;
- X c2 = *str2++;
- X if (isupper(c1)) c1 += 32;
- X if (isupper(c2)) c2 += 32;
- X if (c1 == c2) {
- X if (!c1)
- X return(0);
- X continue;
- X } /* endif */
- X if (c1 < c2)
- X return -1;
- X return 1;
- X } /* endwhile */
- X return(0);
- X}
- X
- X#endif /* NEED_STRCASE */
- END_OF_FILE
- if test 2549 -ne `wc -c <'str.c'`; then
- echo shar: \"'str.c'\" unpacked with wrong size!
- fi
- # end of 'str.c'
- fi
- if test -f 'str.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'str.h'\"
- else
- echo shar: Extracting \"'str.h'\" \(476 characters\)
- sed "s/^X//" >'str.h' <<'END_OF_FILE'
- X/* $Id: str.h,v 1.1 92/05/23 14:06:53 kim Exp $
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * $Log: str.h,v $
- X * Revision 1.1 92/05/23 14:06:53 kim
- X * External definitions from str.c
- X *
- X */
- X
- extern int strspacecmp(char*, char*);
- X
- X#ifdef NEED_STRCASE
- extern int strcasecmp(char*, char*);
- extern int strncasecmp(char*, char*, int);
- X#endif
- END_OF_FILE
- if test 476 -ne `wc -c <'str.h'`; then
- echo shar: \"'str.h'\" unpacked with wrong size!
- fi
- # end of 'str.h'
- fi
- if test -f 'test.u' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test.u'\"
- else
- echo shar: Extracting \"'test.u'\" \(208 characters\)
- sed "s/^X//" >'test.u' <<'END_OF_FILE'
- X# Editor = ed@foo.bar
- X# Errors-To = mistake@foo.bar
- X# Owner = you@foo.bar
- X# Review = Private
- X# Send = Public
- X# Subscription = Owner
- listman@host.foo.ba (Listserv Manager)
- END_OF_FILE
- if test 208 -ne `wc -c <'test.u'`; then
- echo shar: \"'test.u'\" unpacked with wrong size!
- fi
- # end of 'test.u'
- fi
- if test -f 'test.w' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test.w'\"
- else
- echo shar: Extracting \"'test.w'\" \(63 characters\)
- sed "s/^X//" >'test.w' <<'END_OF_FILE'
- Welcome to test.
- This message is sent to every new subscriber.
- END_OF_FILE
- if test 63 -ne `wc -c <'test.w'`; then
- echo shar: \"'test.w'\" unpacked with wrong size!
- fi
- # end of 'test.w'
- fi
- if test -f 'tulp.5' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tulp.5'\"
- else
- echo shar: Extracting \"'tulp.5'\" \(6897 characters\)
- sed "s/^X//" >'tulp.5' <<'END_OF_FILE'
- X.TH TULP 5
- X.BY "TULP"
- X.SH NAME
- lists \- list of active public mailing-lists
- X.br
- listname.u \- mailing-list description file
- X.br
- listname.w \- mailing-list welcome message
- X.br
- listname.n \- mailing-list \fBX-Sequence\fP counter
- X.br
- listname (directory) \- directory for archive files
- X.SH DESCRIPTION
- These files are used by TULP in order to ensure proper operation.
- The file \fIlists\fP is unique for the package, whereas the
- X\fIlistname.*\fP need or may (for some of them only) to be created
- for each active mailing-list on the system.
- All files must be in the TULP directory that has been defined in
- X\fBconf.h\fP at compile time, typically this would be
- X\fB~listserv/expl\fP where \fB~listserv\fP is the home directory
- of the user under which you're running TULP.
- X.PP
- X.I Lists
- contains the list of active and public lists on your TULP system. Some
- lists may be hidden and thus not appear if this file. The contents of
- the file are a set of text lines, each line describing a particular
- list. It is recommended to use the alphabetic order when filling
- this file. The indicated data is only informative and used when a user
- issues a \fBLISTS\fP command sent to TULP. Each line is divided into
- two comma separated fields:
- X.RS
- X.nf
- name,description
- X.fi
- X.RE
- X.PP
- The first field is the name of the list. The maximum length of this field
- is the maximum length of a filenam on your system, minus 2. Thus it is
- strongly advised not to use names longer than 12 characters, in order to
- be Posix compliant. If you wish a greater compatibility with Bitnet
- LISTSERV's, the length should not exceed 8 characters.
- The name of the list should correspond to the name of the alias where
- messages to the list have to be sent.
- X.PP
- The description field is a few words (30-40 characters) describing
- briefly the list.
- X.PP
- X.I Listname.u
- is the list definition file (where \fIlistname\fP is to be replaced
- by the real name of the list) for a mailing-list. This file is divided
- into two sections: the comments/flags, and the list of subscribers.
- X.PP
- The first sections, called \fIheader\fP, is either comments or
- special flags describing the behavior of the list.
- A comment line must not begin with one of the
- reserved flags given below. All lines within the header must
- begin with a \fB#\fP sign.
- X.PP
- The format of flags is as follow:
- X.RS
- X.nf
- X# flag = value
- X.fi
- X.RE
- X.PP
- The equal sign car be preceeded or followed by zero or more spaces
- or tabulations. Case is not significant.
- The possible values for \fIflag\fP and
- X\fIvalue\fP are:
- X.IP "Review = Public | Private | Owner"
- This flag describes who may retrieve the list of subsribers to a
- given list. \fIPublic\fP allows anyone to get the list of subscribers.
- X\fIPrivate\fP allows only the subscribers to review a list.
- X\fIOwner\fP gives review access only to the owners of the list.
- Unauthorized users will only receive the header of the list in response
- to their command.
- X.IP "Subscription = Open | Closed | Owner"
- This flag describes how subsription orders are to be handled.
- X\fIOpen\fP allows anyone to join the list.
- X\fIClosed\fP will reject all subscription requests.
- X\fIOwner\fP will forward all subscription requests to the owner of
- the lists for approval.
- X.IP "Send = Public | Private | Editor"
- Defines who may send messages to the list.
- X\fIPublic\fP allows anyone, even non-subscribers, to contribute to the list.
- X\fIPrivate\fP allows only subscribers to contribute to the list.
- X\fIEditor\fP defines a moderated list where only the Editor may
- contribute to. All other incoming messages will be forwarded to the
- XEditor for approval.
- X.IP "Notify = Yes | No | email1,email2,..."
- Not implemented yet.
- X.IP "Periodicity = Yearly | Monthly | Weekly | Daily"
- Not implemented yet. All archives are currently handled only on a
- monthly basis.
- X.IP "Errors-To = Owner,email1,email2,..."
- A part to \fBlistname-request\fP if selected, errors will be reported
- to the indicated persons. Currently only \fIemail1\fP may be
- indicated. We do not recommand the usage of this field yet.
- X.IP "Owner = email"
- Defines an owner of a list. Only one owner must be indicated per line,
- but multiple \fIowner\fP lines are allowed. \fIEmail\fP must be the
- email address of the owner, without any comments.
- X.IP "Editor = email"
- Defines the moderator for the list. Only one editor is currently
- supported.
- X.IP "Reply-To = List | Sender | email [,Respect]"
- Defines how the \fBReply-To\fP header has to be handled.
- X\fIList\fP forces replies to be redirected to the mailing-list.
- Use this with care.
- X\fISender\fP will not alter the \fBReply-To\fP header.
- X\fIEmail\fP will force the reply to the indicated email address. Useful
- when doing redistribution lists.
- X\fIRespect\fP may be added where it makes sense and will not alter
- the \fBReply-To\fP field when there is already one in the
- incoming message.
- X.PP
- The second part of the description file contains the list of
- subscribers given in following format:
- X.RS
- X.nf
- user@host.away.domain (First Lastname)
- X.fi
- X.RE
- X.PP
- Where the first field should be a valid email address and the second
- X(between parenthesis) the comment associated to the subsriber,
- typically the name of the person.
- X.PP
- XExemple of list description file (file \fBsample.u\fP):
- X.RS
- X.nf
- X# List "Sample list"
- X#
- X# Contributions: <sample@host.dom.ain>
- X# Commandes: <listserv@host.dom.ain>
- X#
- X# Owner = Christophe.Wolfhugel@host.dom.ain
- X# Owner = Kimmo.Suominen@host.dom.ain
- X# Send = Private
- X# Review = Public
- X# Subscription = Owner
- X# Reply-To = List,Respect
- X#
- chris@there.fr (Christophe Wolfhugel)
- kim@this.fi (Kimmo Suominen)
- pb@mati.fr (Patrice Bere)
- X.fi
- X.RE
- X.PP
- This file might be edited manually only when TULP is not running, in
- order to avoid possible access conflicts and damage to the file.
- X.PP
- This file is mandatory and must be unique for each list you are
- hosting (wether it's described in the file \fIlists\fP or not).
- X.PP
- X.I Listname.w
- is the welcome message that is to be sent to each new subscriber.
- There are no restrictions on its contents, but it's a good idea
- to remind the newcomer at least how to get off the list.
- X.PP
- This file is also mandatory.
- X.PP
- X.I Listname.n
- when existing is the counter for the \fBX-Sequence\fP field to be added
- to each forwarded message. It has to be created containing the
- first sequence number to be used, minus 1. If unexisting, then no
- X\fBX-Sequence\fP header will be added.
- X.PP
- X.I Listname (directory)
- All messages sent to the list will be archives if, and only if,
- this directory exists. The name of the log file will be
- X\fIlogyymm\fP where \fIyy\fP is the current year and
- X\fImm\fP the current month. Exemple: \fItest-list/log9207\fP.
- X.SH SEE ALSO
- tulp(8)
- X.SH HISTORY
- Written by Kimmo Suominen <Kimmo.Suominen@lut.fi>
- and Christophe Wolfhugel <Christophe.Wolfhugel@univ-lyon1.fr>
- for TULP.
- X.de R$
- This is revision \\$3, dated \\$4.
- X..
- X.R$ $Id: tulp.5,v 1.2 92/07/14 13:41:24 wolf Exp $
- END_OF_FILE
- if test 6897 -ne `wc -c <'tulp.5'`; then
- echo shar: \"'tulp.5'\" unpacked with wrong size!
- fi
- # end of 'tulp.5'
- fi
- if test -f 'tulp.8' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tulp.8'\"
- else
- echo shar: Extracting \"'tulp.8'\" \(2444 characters\)
- sed "s/^X//" >'tulp.8' <<'END_OF_FILE'
- X.TH TULP 8
- X.BY "TULP"
- X.SH NAME
- listserv \- TULP main daemon
- X.br
- deliver \- deliver script to be called by the MTA
- X.br
- rc.tulp \- startup script
- X.br
- kilst \- signal generator for the listserv daemon
- X.SH SYNOPSIS
- listserv
- X.br
- deliver listname
- X.br
- rc.tulp
- X.br
- kilst
- X.SH DESCRIPTION
- These executables or shell scripts are the service applications
- used by TULP to ensure proper operation. Installation and configuration
- procedures for TULP are described in the separate file INSTALL.
- X.PP
- X.I Listserv
- is the main executable. It is a straight running daemon that will
- handle all incoming messages, commands or data to be distributed to
- the lists. To start the daemon just type \fIlistserv\fP at the
- command prompt. This assumes that the daemon you already have the
- appropriate priviledge, not root.
- X.PP
- X.I Deliver
- is generally called from the MTA and will deliver an incoming message
- to TULP. The parameter to be furnished to \fIdeliver\fP is the
- name of the list (or \fBlistserv\fP) to which the message is to be
- delivered. Examples:
- X.RS
- X.nf
- X\fIdeliver listserv\fP will deliver a command to TULP.
- X
- X\fIdeliver test-list\fP will deliver a message for \fBtest-list\fP
- to TULP
- X.fi
- X.RE
- X.PP
- The message has to be piped to \fIdeliver\fP. If you are running
- X\fBSendmail\fP, your \fIaliases\fP file could look like:
- X.RS
- X.nf
- listserv: "|/usr/local/etc/deliver listserv"
- test-list: "|/usr/local/etc/deliver test-list"
- real-list: "|/usr/local/etc/deliver real-list"
- X.fi
- X.RE
- X.PP
- X.I Rc.tulp
- is the startup script that is to be used, to start TULP properly.
- Typically this script would be called from \fI/etc/rc.local\fP
- or any similar file on your system.
- Rc.tulp must be started as root, in order to be able to set the
- proper UID before starting the \fIlistserv\fP daemon.
- X.PP
- X.I Kilst
- is not to be used by the user. This setuid program is called by
- the \fIdeliver\fP script in order to send SIGUSR1 to the TULP
- daemon, indicating that a message has just arrived and needs
- handling. On some systems with unreliable signals, this feature
- might, if not should, be disabled.
- X.SH INITIAL SETUP, INSTALLATION, CREATING LISTS
- See the file \fBINSTALL\fP that came with the distribution
- package of TULP.
- X.SH SEE ALSO
- tulp(5)
- X.SH HISTORY
- Written by Kimmo Suominen <Kimmo.Suominen@lut.fi>
- and Christophe Wolfhugel <Christophe.Wolfhugel@univ-lyon1.fr>
- for TULP.
- X.de R$
- This is revision \\$3, dated \\$4.
- X..
- X.R$ $Id: tulp.8,v 1.1 92/07/14 13:42:55 wolf Exp $
- END_OF_FILE
- if test 2444 -ne `wc -c <'tulp.8'`; then
- echo shar: \"'tulp.8'\" unpacked with wrong size!
- fi
- # end of 'tulp.8'
- fi
- if test -f 'vers.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'vers.c'\"
- else
- echo shar: Extracting \"'vers.c'\" \(2213 characters\)
- sed "s/^X//" >'vers.c' <<'END_OF_FILE'
- X/*-------------------------------------------------------------------------
- X * Listserv - Unix Mailing List manager (sub-set of FRECP's
- X * Bitnet Listserv tool).
- X *
- X * Copyright (C) 1991,1992 Kimmo Suominen, Christophe Wolfhugel
- X *
- X * Please read the files COPYRIGHT and AUTHORS for the extended
- X * copyrights refering to this file.
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *----------------------------------------------------------------------*/
- X
- static char rcsid[] = "@(#)$Id: vers.c,v 1.3 92/09/11 09:50:34 wolf Exp $";
- X
- X/*
- X * $Revision: 1.3 $
- X */
- X
- X#include <stdio.h>
- X#include "conf.h"
- X
- char vers[64], versFrom[116];
- X#ifdef ADD_SENDER
- char versSender[124];
- X#endif
- X
- X#include <sys/param.h>
- X#ifdef USE_UNAME
- X# include <sys/utsname.h>
- X#endif
- X#if defined(USE_UNAME) || defined(USE_GETHOSTNAME)
- X# include <sys/types.h>
- X# include <sys/socket.h>
- X# include <netdb.h>
- char myname[MAXHOSTNAMELEN];
- X#endif
- X
- void versInit()
- X{
- X#if defined(USE_UNAME) || defined(USE_GETHOSTNAME)
- X struct hostent *netname;
- X#endif
- X#ifdef USE_GETHOSTNAME
- X char name[MAXHOSTNAMELEN];
- X#endif
- X#ifdef USE_UNAME
- X struct utsname name;
- X uname(&name);
- X netname = gethostbyname(name.nodename);
- X#endif
- X#ifdef USE_GETHOSTNAME
- X gethostname(name, MAXHOSTNAMELEN);
- X netname = gethostbyname(name);
- X#endif
- X#if defined(USE_UNAME) || defined(USE_GETHOSTNAME)
- X strcpy(myname, netname->h_name);
- X#endif
- X sprintf(vers,"Listserv v%s",VERSION);
- X sprintf(versFrom,"From: listserv@%s (%s)\n",HOST,vers);
- X#ifdef ADD_SENDER
- X sprintf(versSender,"Sender: list-errors@%s\n",HOST);
- X#endif
- X}
- END_OF_FILE
- if test 2213 -ne `wc -c <'vers.c'`; then
- echo shar: \"'vers.c'\" unpacked with wrong size!
- fi
- # end of 'vers.c'
- fi
- echo shar: End of archive 1 \(of 2\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked both archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-